/**
 * @Time    : 2021/11/12 11:50:15
 * @Author  : WanRongJia
 * @License : Software business license
 * @Site    : www.linshensjl.top
 * @File    : validateAddClerk.js
 * @Software: Rich Web Platform
 * @Function: 验证登录用户字段
 * @Version : 1.0
 **/

const {validateResult} = require('../../../utils/validationResult')
const {check} = require('express-validator')

const validateLoginByName = [
    check('user_name').optional().isString().withMessage('必须是字符'),
    check('password').exists().withMessage('必须传入密码'),
    (req, res, next) => {
        validateResult(req,res,next)
    },
]

module.exports = {validateLoginByName}